define(["dojo/ready", "dojo/_base/declare", "dojo/dom", "dojo/_base/window", "dijit/MenuBar", "dijit/MenuBarItem", 
    "dijit/DropDownMenu", "dijit/PopupMenuBarItem", "dijit/MenuItem", "dojo/parser", "dojo/request", "dojo/json",
    "dijit/_WidgetBase", "dijit/_TemplatedMixin"],
        function(ready, declare, dom, win, MenuBar, MenuBarItem, DropDownMenu, PopupMenuBarItem, MenuItem, parser,
            request, JSON, _WidgetBase, _TemplatedMixin) {
            return declare("my.AdminMenu", [_WidgetBase, _TemplatedMixin], {
                templateString: 
                    "<div>" +
                    "<div data-dojo-type='dijit/MenuBar'>" +
                    "<div data-dojo-type='dijit/PopupMenuBarItem' data-dojo-attach-point='dashboards' label='Dashboard'>" +
                    "<div data-dojo-type='dijit/DropDownMenu' data-dojo-attach-point='dashboardMenu'></div>" +
                    "</div>" +
                    "<div data-dojo-type='dijit/MenuBarItem' data-dojo-attach-event='onclick: work' label='Work Issues'></div>" +
                    "<div data-dojo-type='dijit/MenuBarItem' data-dojo-attach-event='onclick: importIssues' label='Import Issues'></div>" +
                    "<div data-dojo-type='dijit/MenuBarItem' data-dojo-attach-event='onclick: users' label='Users'></div>" +
                    "<div data-dojo-type='dijit/MenuBarItem' data-dojo-attach-event='onclick: groups' label='Groups'></div>" +
                    "<div data-dojo-type='dijit/MenuBarItem' data-dojo-attach-event='onclick: connections' label='Connections'></div>" +
                    "</div>" +
                    "</div>",

                work: function(){
                    window.location="/workIssues";
                },

                importIssues: function() {
                    window.location="/importIssues";
                },

                users: function(){
                    window.location="/users";
                },

                groups: function(){
                    window.location="/groups";
                },

                connections: function() {
                    window.location="/connections";
                }
            });

            ready(function() {
                parser.parse();
            });
});
